\(\int (c+d x) \sec ^2(a+b x) \, dx\) [35]
Optimal result
Integrand size = 14, antiderivative size = 28 \[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}
\]
[Out]
d*ln(cos(b*x+a))/b^2+(d*x+c)*tan(b*x+a)/b
Rubi [A] (verified)
Time = 0.04 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number
of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4269, 3556}
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}
\]
[In]
Int[(c + d*x)*Sec[a + b*x]^2,x]
[Out]
(d*Log[Cos[a + b*x]])/b^2 + ((c + d*x)*Tan[a + b*x])/b
Rule 3556
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 4269
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {(c+d x) \tan (a+b x)}{b}-\frac {d \int \tan (a+b x) \, dx}{b} \\ & = \frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {d \log (\cos (a+b x))}{b^2}+\frac {c \tan (a+b x)}{b}+\frac {d x \tan (a+b x)}{b}
\]
[In]
Integrate[(c + d*x)*Sec[a + b*x]^2,x]
[Out]
(d*Log[Cos[a + b*x]])/b^2 + (c*Tan[a + b*x])/b + (d*x*Tan[a + b*x])/b
Maple [A] (verified)
Time = 1.20 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.86
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {-\frac {d a \tan \left (b x +a \right )}{b}+c \tan \left (b x +a \right )+\frac {d \left (\left (b x +a \right ) \tan \left (b x +a \right )+\ln \left (\cos \left (b x +a \right )\right )\right )}{b}}{b}\) |
\(52\) |
default |
\(\frac {-\frac {d a \tan \left (b x +a \right )}{b}+c \tan \left (b x +a \right )+\frac {d \left (\left (b x +a \right ) \tan \left (b x +a \right )+\ln \left (\cos \left (b x +a \right )\right )\right )}{b}}{b}\) |
\(52\) |
risch |
\(-\frac {2 i d x}{b}-\frac {2 i d a}{b^{2}}+\frac {2 i \left (d x +c \right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}+\frac {d \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b^{2}}\) |
\(59\) |
parallelrisch |
\(\frac {-d \ln \left (\sec ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \cos \left (b x +a \right )+d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right ) \cos \left (b x +a \right )+d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right ) \cos \left (b x +a \right )+\left (d x +c \right ) b \sin \left (b x +a \right )}{b^{2} \cos \left (b x +a \right )}\) |
\(88\) |
norman |
\(\frac {-\frac {2 c \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {2 d x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}}{\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1}+\frac {d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}{b^{2}}+\frac {d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )}{b^{2}}-\frac {d \ln \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}}\) |
\(104\) |
| | |
|
|
|
[In]
int((d*x+c)*sec(b*x+a)^2,x,method=_RETURNVERBOSE)
[Out]
1/b*(-1/b*d*a*tan(b*x+a)+c*tan(b*x+a)+1/b*d*((b*x+a)*tan(b*x+a)+ln(cos(b*x+a))))
Fricas [A] (verification not implemented)
none
Time = 0.31 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.61
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {d \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right )\right ) + {\left (b d x + b c\right )} \sin \left (b x + a\right )}{b^{2} \cos \left (b x + a\right )}
\]
[In]
integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="fricas")
[Out]
(d*cos(b*x + a)*log(-cos(b*x + a)) + (b*d*x + b*c)*sin(b*x + a))/(b^2*cos(b*x + a))
Sympy [F]
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\int \left (c + d x\right ) \sec ^{2}{\left (a + b x \right )}\, dx
\]
[In]
integrate((d*x+c)*sec(b*x+a)**2,x)
[Out]
Integral((c + d*x)*sec(a + b*x)**2, x)
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (28) = 56\).
Time = 0.35 (sec) , antiderivative size = 159, normalized size of antiderivative = 5.68
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {2 \, c \tan \left (b x + a\right ) - \frac {2 \, a d \tan \left (b x + a\right )}{b} + \frac {{\left ({\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + 4 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b}}{2 \, b}
\]
[In]
integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="maxima")
[Out]
1/2*(2*c*tan(b*x + a) - 2*a*d*tan(b*x + a)/b + ((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a)
+ 1)*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1) + 4*(b*x + a)*sin(2*b*x + 2*a))*d/(
(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*b))/b
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1404 vs. \(2 (28) = 56\).
Time = 0.64 (sec) , antiderivative size = 1404, normalized size of antiderivative = 50.14
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="giac")
[Out]
-1/2*(4*b*d*x*tan(1/2*b*x)^2*tan(1/2*a) + 4*b*d*x*tan(1/2*b*x)*tan(1/2*a)^2 - d*log(4*(tan(1/2*b*x)^4*tan(1/2*
a)^4 - 2*tan(1/2*b*x)^4*tan(1/2*a)^2 - 8*tan(1/2*b*x)^3*tan(1/2*a)^3 - 2*tan(1/2*b*x)^2*tan(1/2*a)^4 + tan(1/2
*b*x)^4 + 8*tan(1/2*b*x)^3*tan(1/2*a) + 20*tan(1/2*b*x)^2*tan(1/2*a)^2 + 8*tan(1/2*b*x)*tan(1/2*a)^3 + tan(1/2
*a)^4 - 2*tan(1/2*b*x)^2 - 8*tan(1/2*b*x)*tan(1/2*a) - 2*tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*ta
n(1/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)*tan(1/2*a)^3 + tan(1/2*a)^4 - 2*tan(1/2*b*x)^2 - 8*tan(1/2*b*x)*tan(1/2*a) - 2*tan(1/2*a)^2 + 1)
/(tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*tan(1/2*b*x)^4*tan(1/2*a)^2 + 2*tan(1/2*b*x)^2*tan(1/2*a)^4 + tan(1/2*b*x)^4
+ 4*tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*a)^4 + 2*tan(1/2*b*x)^2 + 2*tan(1/2*a)^2 + 1)))/(b^2*tan(1/2*b*x)^2
*tan(1/2*a)^2 - b^2*tan(1/2*b*x)^2 - 4*b^2*tan(1/2*b*x)*tan(1/2*a) - b^2*tan(1/2*a)^2 + b^2)
Mupad [B] (verification not implemented)
Time = 14.51 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.96
\[
\int (c+d x) \sec ^2(a+b x) \, dx=\frac {d\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+1\right )}{b^2}+\frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}+1\right )}-\frac {d\,x\,2{}\mathrm {i}}{b}
\]
[In]
int((c + d*x)/cos(a + b*x)^2,x)
[Out]
(d*log(exp(a*2i)*exp(b*x*2i) + 1))/b^2 + ((c + d*x)*2i)/(b*(exp(a*2i + b*x*2i) + 1)) - (d*x*2i)/b